#ifndef MYBUTTON_H
#define MYBUTTON_H


#include <QtGui>

class Button : public QPushButton
{
    Q_OBJECT
public:
    Button(QWidget *parent=0);
    void setButtonPicture(QPixmap pic);
    void setPressPicture(QPixmap pic);
    void setReleasePicture(QPixmap pic);
    void setEnterPicture(QPixmap pic);
    void setLeavePicture(QPixmap pic);

    void set_X_Y_width_height(int x, int y, int width, int height);

    void mousePressEvent (QMouseEvent *event);
    void mouseReleaseEvent (QMouseEvent *event);
    void setId(QString id);
    QString getId(void);
public slots:

private:
    QPixmap *buttonPicture;
    QPixmap *pressPicture;
    QPixmap *releasePicture;

    QPixmap *enterPicture;
    QPixmap *leavePicture;
    bool flag;
    QString buttonId;
};


#endif // MYBUTTON_H
